<?php
/**
 * <https://y.st./>
 * Copyright © 2015 Alex Yst <mailto:copyright@y.st>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org./licenses/>.
**/

$xhtml = array(
	'<{title}>' => 'libtool and libstairs',
	'<{body}>' => <<<END
<p>
	My patch from yesterday was accepted without comment.
	The bug wasn&apos;t a big deal because it was in the minimal testing game, but why leave a needless bug when it is so easily fixed?
</p>
<p>
	I reinvented placeable tools in Minetest, though they don&apos;t seem to work as well as last time.
	Specifically, last time they could only be placed on walkable surfaces, and I don&apos;t remember how I set that up.
	I might be able to figure that out later.
	I need to work more on making them act like attached nodes, anyway.
	The problem is that if I outright make them be attached nodes, they lose their tool wear when they drop.
	I&apos;m all for repairable tools and all, but I&apos;d rather it not be through a glitch.
</p>
<p>
	I also rebuilt libstairs by reworking the default stairs module again.
	Libstairs provides both more ease and more flexibility than the original stairs module, but the concept is pretty much the same.
	In the original stairs module, only one module can define a stair or slab with a given name due to the stairs module greedily hording all the stairs and slabs within its own name space instead of putting them in the name space of the module that actually called for them to be defined.
	If a second (or third, et cetera) module tries to define a stair by the same name, unaware that the first one has already taken the name, it overwrites the first! Libstairs instead puts the nodes within the name space of the calling module, so no naming clashes occur.
	The side effect is that other modules are not able to re-call functions from the libstairs $a[API] to redefine a node originally defined by another module.
	I understand this is a shortcoming, and I will probably work on a way to fix that at some point, but it&apos;s better than accidentally overwriting nodes defined by other modules, and nodes defined using libstairs can still be modified using the standard Minetest $a[API].
</p>
<p>
	My <a href="/a/canary.txt">canary</a> still sings the tune of freedom and transparency.
</p>
END
);
